{include file="$usertemplate/header.tpl.html" title=header} 
            <div class="content">
            	<div class="leftCont">
                    {if $productsPromotionItems}
                	<div class="boxpro">
                    	<div class="tt-boxpro">
                        	<ul>
                            	<li class="tt-left"><p>Sản phẩm khuyến mãi</p></li>
                                <li class="tt-right"><!--<a href="#">Xem tất cả</a>--></li>
                            </ul>
                        </div><!--tt-boxpro-->
                        <div class="cc-boxpro">
                            {foreach from=$productsPromotionItems item=item}
                            {assign var=price value=$item->getPrice()}
                            {assign var=sprice value=$item->getSPrice()}
                            {assign var=percent value=$sprice*100*-1/$price+100|round:1 }
                        	<div class="boxsp">
                                {if $price > $sprice && $sprice>0}
                            	<div class="sale"><p>{$percent}%</p></div>
                                {/if}
                            	<ul>
                                	<li class="pic">
                                    	<div class="pic-1">
                                            <table cellspacing="0" cellpadding="0" width="100%">
                                                <tbody>
                                                    <tr>
                                                        <td class="pic_1">
                                                            <a href="{$item->getViewUrl()}">
                                                                <img src="{$ROOTPATH}/gallery/avatar_upload/products/avatar/{$item->getAvatar()}" alt="" />
                                                            </a>
                                                        </td>
                                                    </tr>
                                                </tbody>
                                            </table>
                                    	</div>
                                    </li>
                                    <li class="tit">
                                        <a href="{$item->getViewUrl()}">{$item->getName($lang)}</a>
                                    </li>
                                    {if $price > $sprice && $sprice>0}
                                    <li class="gic"><p>Giá: {$item->getPrice()|number_format:0:",":"."} vnđ</p></li>
                                    <li class="gim"><p>Giá: {$item->getSPrice()|number_format:0:",":"."} vnđ</p></li>
                                    {else}
                                    <li class="gim"><p>Giá: {$item->getPrice()|number_format:0:",":"."} vnđ</p></li>
                                    {/if}
                                    <li class="nut">
                                    	<ul>
                                        	<li class="mua">
                                                <form class="shopping" name="{$item->getId()}" action="" method="post">
                                                    <input type="hidden" name="op" value="shopping" />
                                                    <input type="hidden" name="id" value="{$item->getId()}" />
                                                    <input type="hidden" name="slug" value="{$item->getSlug()}" />
                                                    <input type="hidden" name="plus" value="addToCart" />
                                                    <input type="hidden" name="lang" value="{$lang}" /> 
                                                    <a href="javascript:;" onclick="$(this).parents('form').submit();">Mua</a>
                                                </form>
                                            </li>
                                            <li class="chi"><a href="{$item->getViewUrl()}">Chi tiết</a></li>
                                        </ul>
                                    </li>
                                </ul>
                            </div><!--boxsp-->
                            {/foreach}
                        </div><!--cc-boxpro-->
                    </div><!--boxpro-->
                    {/if}
                    {if $productsAlot}
                    <div class="boxpro">
                    	<div class="tt-boxpro">
                        	<ul>
                            	<li class="tt-left"><p>Sản phẩm bán chạy</p></li>
                                <!--<li class="tt-right"><a href="#">Xem tất cả</a></li>-->
                            </ul>
                        </div><!--tt-boxpro-->
                        <div class="cc-boxpro">
                            {foreach from=$productsAlot item=item}
                            {assign var=price value=$item->getPrice()}
                            {assign var=sprice value=$item->getSPrice()}
                            {assign var=percent value=$sprice*100*-1/$price+100|round:1 }
                        	<div class="boxsp">
                                {if $price > $sprice && $sprice>0}
                            	<div class="sale"><p>{$percent}%</p></div>
                                {/if}
                            	<ul>
                                	<li class="pic">
                                    	<div class="pic-1">
                                            <table cellspacing="0" cellpadding="0" width="100%">
                                                <tbody>
                                                    <tr>
                                                        <td class="pic_1">
                                                            <a href="{$item->getViewUrl()}">
                                                                <img src="{$ROOTPATH}/gallery/avatar_upload/products/avatar/{$item->getAvatar()}" alt="" />
                                                            </a>
                                                        </td>
                                                    </tr>
                                                </tbody>
                                            </table>
                                    	</div>
                                    </li>
                                    <li class="tit">
                                        <a href="{$item->getViewUrl()}">{$item->getName($lang)}</a>
                                    </li>
                                    {if $price > $sprice && $sprice>0}
                                    <li class="gic"><p>Giá: {$item->getPrice()|number_format:0:",":"."} vnđ</p></li>
                                    <li class="gim"><p>Giá: {$item->getSPrice()|number_format:0:",":"."} vnđ</p></li>
                                    {else}
                                    <li class="gim"><p>Giá: {$item->getPrice()|number_format:0:",":"."} vnđ</p></li>
                                    {/if}
                                    <li class="nut">
                                    	<ul>
                                        	<li class="mua">
                                                <form class="shopping" name="{$item->getId()}" action="" method="post">
                                                    <input type="hidden" name="op" value="shopping" />
                                                    <input type="hidden" name="id" value="{$item->getId()}" />
                                                    <input type="hidden" name="slug" value="{$item->getSlug()}" />
                                                    <input type="hidden" name="plus" value="addToCart" />
                                                    <input type="hidden" name="lang" value="{$lang}" /> 
                                                    <a href="javascript:;" onclick="$(this).parents('form').submit();">Mua</a>
                                                </form>
                                            </li>
                                            <li class="chi"><a href="{$item->getViewUrl()}">Chi tiết</a></li>
                                        </ul>
                                    </li>
                                </ul>
                            </div><!--boxsp-->
                            {/foreach}
                        </div><!--cc-boxpro-->
                    </div><!--boxpro-->
                    {/if}
                    {if $productsNews}
                    <div class="boxpro">
                    	<div class="tt-boxpro">
                        	<ul>
                            	<li class="tt-left"><p>Sản phẩm mới</p></li>
                                <!-- <li class="tt-right"><a href="#">Xem tất cả</a></li> -->
                            </ul>
                        </div><!--tt-boxpro-->
                        <div class="cc-boxpro">
                            {foreach from=$productsNews item=item}
                            {assign var=price value=$item->getPrice()}
                            {assign var=sprice value=$item->getSPrice()}
                            {assign var=percent value=$sprice*100*-1/$price+100|round:1 }
                        	<div class="boxsp">
                                {if $price > $sprice && $sprice>0}
                            	<div class="sale"><p>{$percent}%</p></div>
                                {/if}
                            	<ul>
                                	<li class="pic">
                                    	<div class="pic-1">
                                            <table cellspacing="0" cellpadding="0" width="100%">
                                                <tbody>
                                                    <tr>
                                                        <td class="pic_1">
                                                            <a href="{$item->getViewUrl()}">
                                                                <img src="{$ROOTPATH}/gallery/avatar_upload/products/avatar/{$item->getAvatar()}" alt="" />
                                                            </a>
                                                        </td>
                                                    </tr>
                                                </tbody>
                                            </table>
                                    	</div>
                                    </li>
                                    <li class="tit">
                                        <a href="{$item->getViewUrl()}">{$item->getName($lang)}</a>
                                    </li>
                                    {if $price > $sprice && $sprice>0}
                                    <li class="gic"><p>Giá: {$item->getPrice()|number_format:0:",":"."} vnđ</p></li>
                                    <li class="gim"><p>Giá: {$item->getSPrice()|number_format:0:",":"."} vnđ</p></li>
                                    {else}
                                    <li class="gim"><p>Giá: {$item->getPrice()|number_format:0:",":"."} vnđ</p></li>
                                    {/if}
                                    <li class="nut">
                                    	<ul>
                                        	<li class="mua">
                                                <form class="shopping" name="{$item->getId()}" action="" method="post">
                                                    <input type="hidden" name="op" value="shopping" />
                                                    <input type="hidden" name="id" value="{$item->getId()}" />
                                                    <input type="hidden" name="slug" value="{$item->getSlug()}" />
                                                    <input type="hidden" name="plus" value="addToCart" />
                                                    <input type="hidden" name="lang" value="{$lang}" /> 
                                                    <a href="javascript:;" onclick="$(this).parents('form').submit();">Mua</a>
                                                </form>
                                            </li>
                                            <li class="chi"><a href="{$item->getViewUrl()}">Chi tiết</a></li>
                                        </ul>
                                    </li>
                                </ul>
                            </div><!--boxsp-->
                            {/foreach}
                        </div><!--cc-boxpro-->
                    </div><!--boxpro-->
                    {/if}
                </div><!--leftCont-->
                <!--rightCont-->
             {include file="$usertemplate/right.tpl.html" title=right}  
            </div><!--content-->
{include file="$usertemplate/footer.tpl.html" title=footer} 